
{!! admin_section(YmPhp\Admin\Admin::SECTION['NAVBAR_BEFORE']) !!}
@php
    $url = $_SERVER['REQUEST_URI'];
    $urlComponents = parse_url($url);
    $parts = explode('/', $urlComponents['path']);
    $admincp = config('admin.route.prefix');
@endphp

<nav class="header-navbar navbar-expand-lg navbar navbar-with-menu {{ $configData['navbar_class'] }}
    {{ $configData['navbar_color'] }} navbar-light" style="top: 0; z-index: 2;min-width: 1100px;">

    <div class="navbar-wrapper">
        <div class="navbar-container content header">
            @if(! $configData['horizontal_menu'])
            <div class="mr-auto float-left bookmark-wrapper d-flex align-items-center" style="margin-top: 5px;">
                <ul class="nav navbar-nav">
                    <li class="nav-item mr-auto">
                        <a href="{{ admin_url('/dashboard') }}" class="navbar-brand waves-effect waves-light" title="{!! config('admin.logo-title') !!}">
                            <span class="logo-mini">{!! config('admin.logo') !!}</span>
                        </a>
                    </li>
                </ul>
            </div>
            @endif
            <div class="navbar-collapse d-flex justify-content-between">
                <div class="navbar-left d-flex align-items-center">
                    @if(! $configData['horizontal_menu'])
{{--                    <div class="common-function">--}}
{{--                        <button class="common-function-btn">常用</button>--}}
{{--                        <div class="common-collection-function">--}}
{{--                            <s class="arrow"></s>--}}
{{--                            <div class="ccf-list">--}}
{{--                                <div class="common-function-list">--}}
{{--                                    <h3>最近使用</h3>--}}
{{--                                    <ul>--}}
{{--                                        <li><a class="add-page" data-menuid="tongcheng" data-id="tongcheng" data-name="信息设置" href="?action=tongcheng&amp;operation=config" title="信息设置">信息设置</a></li>--}}
{{--                                    </ul>--}}
{{--                                </div>--}}
{{--                                <div class="collection-function-list">--}}
{{--                                    <h3>我的收藏<em></em></h3>--}}
{{--                                    <ul>--}}
{{--                                        <li><a class="add-page curr" data-id="setting" data-name="平台设置" href="?action=setting&amp;operation=basic" title="平台设置">平台设置</a></li>--}}
{{--                                    </ul>--}}
{{--                                </div>--}}
{{--                            </div>--}}
{{--                        </div>--}}
{{--                    </div>--}}
                    @endif
                    <ul class="header-nav">
                        <li class="@if ($urlComponents['path'] != '/'.$admincp.'/addons/extensions' && $urlComponents['path'] != '/'.$admincp.'/member/finance') curr @endif"><a id="homepage" data-url="{!! admin_url('/dashboard') !!}">首页</a></li>
                        <li class="@if ($urlComponents['path'] == '/'.$admincp.'/member/finance') curr @endif"><a class="add-page" id="finance" data-name="平台收入" data-url="{!! admin_url('/member/finance') !!}">财务中心</a></li>
                        <li class="@if ($urlComponents['path'] == '/'.$admincp.'/addons/extensions') curr @endif"><a class="add-page" id="plugins" data-name="插件" data-url="{!! admin_url('/addons/extensions') !!}">插件管理</a></li>
{{--                        <li class=""><a class="add-page" id="store" data-name="商店" data-url="/">商店</a></li>--}}
                    </ul>
                    {!! YmPhp\Admin\Admin::navbar()->render('left') !!}
                </div>


                <ul class="navbar-right d-flex align-items-center header-bar" style="margin-right: 30px;">
                    <li class="todo">
                        <a href="javascript:;">待办事项<i>0</i></a>
                        <div class="notify-popup">
                            <s class="arrow"></s>
                            <div class="tit"><h3>待办事项</h3><a href="javascript:;" class="sound" title="关闭声音"></a></div>
                            <div class="con"><div class="notice-empty">全都处理完咯，暂无其他待办事项</div></div>
                        </div>
                    </li>
                    <li class="homepage">
                        <a href="/" target="_blank">网站首页</a>
                    </li>
                    <li class="user">
                        {!! admin_section(YmPhp\Admin\Admin::SECTION['NAVBAR_USER_PANEL']) !!}
                    </li>
                </ul>

                {{--                    {!! YmPhp\Admin\Admin::navbar()->render() !!}--}}
                {{--1--}}
                {{--                    <ul class="nav navbar-nav">--}}
                {{--                        --}}{{--User Account Menu--}}
{{--                                        {!! admin_section(YmPhp\Admin\Admin::SECTION['NAVBAR_USER_PANEL']) !!}--}}

                {{--                        {!! admin_section(YmPhp\Admin\Admin::SECTION['NAVBAR_AFTER_USER_PANEL']) !!}--}}
                {{--                    </ul>--}}
            </div>

        </div>
    </div>
</nav>
@if($urlComponents['path'] == '/admin' ||  $urlComponents['path'] == '/admin/dashboard')
    <div class="headerbg"></div>
@endif
<script>
    $(function ($) {
        $('#homepage , #finance ,#plugins').click(function () {
            window.location.href = $(this).data('url');
        });
    });
</script>

{!! admin_section(YmPhp\Admin\Admin::SECTION['NAVBAR_AFTER']) !!}
